package com.dt76.smallloanbackendservice.controller.xiaohao;

import com.dt76.smallloanbackendservice.pojo.xiaohao.HContractTemplate;
import com.dt76.smallloanbackendservice.service.xiaohao.HContractTemplateService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;


@Controller
@RequestMapping("/xiaohao")
public class ContractTemplateController {

    @Resource
    private HContractTemplateService hContractTemplateService;

    //所有启用的模板
    @RequestMapping("/HContractTemplate/qryAll")
    @ResponseBody
    public List<HContractTemplate> qryAll(){
        return hContractTemplateService.qryAll();
    }

    //根据id查询合同模板
    @RequestMapping("/HContractTemplate/qryByID")
    @ResponseBody
    public HContractTemplate qryByID(int id){
        return hContractTemplateService.qryByID(id);
    }
}
